//
//  oldFamilyFirstViewHeader.m
//  laonianbangfamily
//
//  Created by 勇拓 李 on 18/3/23.
//  Copyright © 2018年 zaiyou. All rights reserved.
//

#import "oldFamilyFirstViewHeader.h"
#import "oldSearchTitleView.h"

@interface oldFamilyFirstViewHeader()<oldBannerViewDelegate, oldMutileIconScrollViewDelegate>
@property (weak, nonatomic) IBOutlet UIView *topView;
@property (weak, nonatomic) IBOutlet UIView *bottonView;
@property (weak, nonatomic) IBOutlet UIView *middleView;

@property (nonatomic, strong)oldSearchTitleView *searchView;
@end

@implementation oldFamilyFirstViewHeader

- (void)awakeFromNib
{
    [super awakeFromNib];
    
    oldBannerView *bannerView = [oldBannerView new];
    [bannerView initBanner];
    bannerView.delegate = self;
    [self.topView addSubview:bannerView];
    
    oldMutileIconScrollView *scrollView = [oldMutileIconScrollView new];
    scrollView.frame = _bottonView.bounds;
    scrollView.delegate = self;
    [self.bottonView addSubview:scrollView];
    
//    oldSearchTitleView *searchView = [[[NSBundle mainBundle] loadNibNamed:@"oldSearchTitleView" owner:self
//        options:nil] objectAtIndex:0];
//    searchView.frame = _middleView.bounds;
//    
//    [_middleView addSubview:searchView];
}

#pragma mark - bannerdelegate
- (void)bannerClicked:(NSString *)url Type:(Old_BannerUrltype)type
{
    [self.delegate bannerClicked:url Type:type];
}

#pragma mark - servicedelegate
- (void)whichIconChoosed:(oldService *)service
{
    [self.delegate ServiceChoosed:service];
}

@end
